<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>class RSS::Element - rss: Ruby Standard Library Documentation</title>


<script src="../js/navigation.js" defer></script>
<script src="../js/search.js" defer></script>
<script src="../js/search_index.js" defer></script>
<script src="../js/searcher.js" defer></script>
<script src="../js/darkfish.js" defer></script>

<script src="../js/jquery-3.2.0.min.js"></script>

<script src="../js/vue.min.js"></script>
<script src="../js/js.cookie.min.js"></script>

<link href="../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../css/rdoc.css" rel="stylesheet">
<link href="../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../";
  var index_rel_prefix = "../";
  var darkModeCsseHref = "../css/rdoc-dm.css"
  var defaultModeCssHref = "../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="class">
  <!-- this is class.html -->

  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->

  <div class='wrapper hdiv'>

    


    <nav id='vapp' role="navigation">
    <div id="project-navigation">
      <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../table_of_contents.html#pages">Pages</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </div>
</div>

      <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

    </div>


    

    <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>
    <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
      <div id="class-metadata">
        
        
<div id="parent-class-section" class="nav-section">
  <h3>Parent</h3>

  <p class="link">Object
</div>

        
<div id="includes-section" class="nav-section">
  <h3>Included Modules</h3>

  <ul class="link-list">
    <li><a class="include" href="SetupMaker.html">RSS::SetupMaker</a>
  </ul>
</div>

        
<div id="extends-section" class="nav-section">
  <h3>Extended With Modules</h3>

  <ul class="link-list">
    <li><a class="extend" href="BaseModel.html">RSS::BaseModel</a>
    <li><a class="extend" href="Utils/InheritedReader.html">RSS::Utils::InheritedReader</a>
  </ul>
</div>

        
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li ><a href="#method-c-add_have_children_element">::add_have_children_element</a>
    <li ><a href="#method-c-add_need_initialize_variable">::add_need_initialize_variable</a>
    <li ><a href="#method-c-add_plural_form">::add_plural_form</a>
    <li ><a href="#method-c-add_to_element_method">::add_to_element_method</a>
    <li ><a href="#method-c-content_setup">::content_setup</a>
    <li ><a href="#method-c-def_corresponded_attr_reader">::def_corresponded_attr_reader</a>
    <li ><a href="#method-c-def_corresponded_attr_writer">::def_corresponded_attr_writer</a>
    <li ><a href="#method-c-get_attributes">::get_attributes</a>
    <li ><a href="#method-c-have_children_elements">::have_children_elements</a>
    <li ><a href="#method-c-have_content-3F">::have_content?</a>
    <li ><a href="#method-c-inherited">::inherited</a>
    <li ><a href="#method-c-inherited_base">::inherited_base</a>
    <li ><a href="#method-c-install_get_attribute">::install_get_attribute</a>
    <li ><a href="#method-c-install_model">::install_model</a>
    <li ><a href="#method-c-install_must_call_validator">::install_must_call_validator</a>
    <li ><a href="#method-c-install_ns">::install_ns</a>
    <li ><a href="#method-c-models">::models</a>
    <li ><a href="#method-c-must_call_validators">::must_call_validators</a>
    <li ><a href="#method-c-need_initialize_variables">::need_initialize_variables</a>
    <li ><a href="#method-c-need_parent-3F">::need_parent?</a>
    <li ><a href="#method-c-new">::new</a>
    <li ><a href="#method-c-plural_forms">::plural_forms</a>
    <li ><a href="#method-c-required_prefix">::required_prefix</a>
    <li ><a href="#method-c-required_uri">::required_uri</a>
    <li ><a href="#method-c-tag_name">::tag_name</a>
    <li ><a href="#method-c-to_element_methods">::to_element_methods</a>
    <li ><a href="#method-i-__validate">#__validate</a>
    <li ><a href="#method-i-_attrs">#_attrs</a>
    <li ><a href="#method-i-_tags">#_tags</a>
    <li ><a href="#method-i-_validate">#_validate</a>
    <li ><a href="#method-i-calc_indent">#calc_indent</a>
    <li ><a href="#method-i-children">#children</a>
    <li ><a href="#method-i-collect_attrs">#collect_attrs</a>
    <li ><a href="#method-i-content_is_set-3F">#content_is_set?</a>
    <li ><a href="#method-i-convert">#convert</a>
    <li ><a href="#method-i-converter-3D">#converter=</a>
    <li ><a href="#method-i-empty_content-3F">#empty_content?</a>
    <li ><a href="#method-i-full_name">#full_name</a>
    <li ><a href="#method-i-have_required_elements-3F">#have_required_elements?</a>
    <li ><a href="#method-i-have_xml_content-3F">#have_xml_content?</a>
    <li ><a href="#method-i-initialize_have_children_elements">#initialize_have_children_elements</a>
    <li ><a href="#method-i-initialize_variables">#initialize_variables</a>
    <li ><a href="#method-i-make_start_tag">#make_start_tag</a>
    <li ><a href="#method-i-need_base64_encode-3F">#need_base64_encode?</a>
    <li ><a href="#method-i-set_next_element">#set_next_element</a>
    <li ><a href="#method-i-tag">#tag</a>
    <li ><a href="#method-i-tag_filter">#tag_filter</a>
    <li ><a href="#method-i-tag_name">#tag_name</a>
    <li ><a href="#method-i-tag_name_with_prefix">#tag_name_with_prefix</a>
    <li ><a href="#method-i-to_s">#to_s</a>
    <li ><a href="#method-i-valid-3F">#valid?</a>
    <li ><a href="#method-i-validate">#validate</a>
    <li ><a href="#method-i-validate_attribute">#validate_attribute</a>
    <li ><a href="#method-i-validate_for_stream">#validate_for_stream</a>
    <li ><a href="#method-i-xmled_content">#xmled_content</a>
  </ul>
</div>

      </div>
     </div>
    </nav>


    <div id='extraz'><div class='adzbox-index'  >
      
     </div>         
    </div>

    <main role="main" aria-labelledby="class-RSS::Element">
    <h1 id="class-RSS::Element" class="class">
      class RSS::Element
    </h1>

    <section class="description">
    
    </section>

      <section id="5Buntitled-5D" class="documentation-section">


      <section class="constants-list">
      <header>
      <h3>Constants</h3>
      </header>
      <dl>
          <dt id="GET_ATTRIBUTES">GET_ATTRIBUTES
          <dd>
          <dt id="HAVE_CHILDREN_ELEMENTS">HAVE_CHILDREN_ELEMENTS
          <dd>
          <dt id="INDENT">INDENT
          <dd>
          <dt id="MODELS">MODELS
          <dd>
          <dt id="MUST_CALL_VALIDATORS">MUST_CALL_VALIDATORS
          <dd>
          <dt id="NEED_INITIALIZE_VARIABLES">NEED_INITIALIZE_VARIABLES
          <dd>
          <dt id="PLURAL_FORMS">PLURAL_FORMS
          <dd>
          <dt id="TO_ELEMENT_METHODS">TO_ELEMENT_METHODS
          <dd>
        </dl>
        </section>

        <section class="attribute-method-details" class="method-section">
        <header>
        <h3>Attributes</h3>
        </header>

          <div id="attribute-i-do_validate" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">do_validate</span><span
                class="attribute-access-type">[RW]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
          <div id="attribute-i-parent" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">parent</span><span
                class="attribute-access-type">[RW]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
            </section>


                <section id="public-class-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Class Methods</h3>
                </header>

                  <div id="method-c-add_have_children_element" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">add_have_children_element</span><span
                                class="method-args">(variable_name, plural_name)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="add_have_children_element-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 832</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">add_have_children_element</span>(<span class="ruby-identifier">variable_name</span>, <span class="ruby-identifier">plural_name</span>)
  <span class="ruby-keyword">self</span><span class="ruby-operator">::</span><span class="ruby-constant">HAVE_CHILDREN_ELEMENTS</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-identifier">variable_name</span>, <span class="ruby-identifier">plural_name</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-add_need_initialize_variable" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">add_need_initialize_variable</span><span
                                class="method-args">(variable_name)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="add_need_initialize_variable-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 840</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">add_need_initialize_variable</span>(<span class="ruby-identifier">variable_name</span>)
  <span class="ruby-keyword">self</span><span class="ruby-operator">::</span><span class="ruby-constant">NEED_INITIALIZE_VARIABLES</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">variable_name</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-add_plural_form" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">add_plural_form</span><span
                                class="method-args">(singular, plural)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="add_plural_form-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 844</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">add_plural_form</span>(<span class="ruby-identifier">singular</span>, <span class="ruby-identifier">plural</span>)
  <span class="ruby-keyword">self</span><span class="ruby-operator">::</span><span class="ruby-constant">PLURAL_FORMS</span>[<span class="ruby-identifier">singular</span>] = <span class="ruby-identifier">plural</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-add_to_element_method" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">add_to_element_method</span><span
                                class="method-args">(method_name)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="add_to_element_method-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 836</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">add_to_element_method</span>(<span class="ruby-identifier">method_name</span>)
  <span class="ruby-keyword">self</span><span class="ruby-operator">::</span><span class="ruby-constant">TO_ELEMENT_METHODS</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">method_name</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-content_setup" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">content_setup</span><span
                                class="method-args">(type=nil, disp_name=nil)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="content_setup-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 821</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">content_setup</span>(<span class="ruby-identifier">type</span>=<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">disp_name</span>=<span class="ruby-keyword">nil</span>)
  <span class="ruby-identifier">writer_type</span>, <span class="ruby-identifier">reader_type</span> = <span class="ruby-identifier">type</span>
  <span class="ruby-identifier">def_corresponded_attr_writer</span> <span class="ruby-value">:content</span>, <span class="ruby-identifier">writer_type</span>, <span class="ruby-identifier">disp_name</span>
  <span class="ruby-identifier">def_corresponded_attr_reader</span> <span class="ruby-value">:content</span>, <span class="ruby-identifier">reader_type</span>
  <span class="ruby-ivar">@have_content</span> = <span class="ruby-keyword">true</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-def_corresponded_attr_reader" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">def_corresponded_attr_reader</span><span
                                class="method-args">(name, type=nil)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="def_corresponded_attr_reader-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 802</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">def_corresponded_attr_reader</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">type</span>=<span class="ruby-keyword">nil</span>)
  <span class="ruby-keyword">case</span> <span class="ruby-identifier">type</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:inherit</span>
    <span class="ruby-identifier">inherit_convert_attr_reader</span> <span class="ruby-identifier">name</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:uri</span>
    <span class="ruby-identifier">uri_convert_attr_reader</span> <span class="ruby-identifier">name</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:explicit_clean_other</span>
    <span class="ruby-identifier">explicit_clean_other_attr_reader</span> <span class="ruby-identifier">name</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:yes_other</span>
    <span class="ruby-identifier">yes_other_attr_reader</span> <span class="ruby-identifier">name</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:csv</span>
    <span class="ruby-identifier">csv_attr_reader</span> <span class="ruby-identifier">name</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:csv_integer</span>
    <span class="ruby-identifier">csv_attr_reader</span> <span class="ruby-identifier">name</span>, <span class="ruby-value">:separator</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-string">&quot;,&quot;</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">convert_attr_reader</span> <span class="ruby-identifier">name</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-def_corresponded_attr_writer" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">def_corresponded_attr_writer</span><span
                                class="method-args">(name, type=nil, disp_name=nil)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="def_corresponded_attr_writer-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 770</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">def_corresponded_attr_writer</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">type</span>=<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">disp_name</span>=<span class="ruby-keyword">nil</span>)
  <span class="ruby-identifier">disp_name</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">name</span>
  <span class="ruby-keyword">case</span> <span class="ruby-identifier">type</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:integer</span>
    <span class="ruby-identifier">integer_writer</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">disp_name</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:positive_integer</span>
    <span class="ruby-identifier">positive_integer_writer</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">disp_name</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:boolean</span>
    <span class="ruby-identifier">boolean_writer</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">disp_name</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:w3cdtf</span>, <span class="ruby-value">:rfc822</span>, <span class="ruby-value">:rfc2822</span>
    <span class="ruby-identifier">date_writer</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">type</span>, <span class="ruby-identifier">disp_name</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:text_type</span>
    <span class="ruby-identifier">text_type_writer</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">disp_name</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:content</span>
    <span class="ruby-identifier">content_writer</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">disp_name</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:explicit_clean_other</span>
    <span class="ruby-identifier">explicit_clean_other_writer</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">disp_name</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:yes_other</span>
    <span class="ruby-identifier">yes_other_writer</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">disp_name</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:csv</span>
    <span class="ruby-identifier">csv_writer</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">disp_name</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:csv_integer</span>
    <span class="ruby-identifier">csv_integer_writer</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">disp_name</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:itunes_episode</span>
    <span class="ruby-identifier">itunes_episode_writer</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">disp_name</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:itunes_episode_type</span>
    <span class="ruby-identifier">itunes_episode_type_writer</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">disp_name</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">attr_writer</span> <span class="ruby-identifier">name</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-get_attributes" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">get_attributes</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="get_attributes-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 707</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_attributes</span>
  <span class="ruby-identifier">inherited_array_reader</span>(<span class="ruby-string">&quot;GET_ATTRIBUTES&quot;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-have_children_elements" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">have_children_elements</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="have_children_elements-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 710</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">have_children_elements</span>
  <span class="ruby-identifier">inherited_array_reader</span>(<span class="ruby-string">&quot;HAVE_CHILDREN_ELEMENTS&quot;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-have_content-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">have_content?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="have_content-3F-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 828</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">have_content?</span>
  <span class="ruby-ivar">@have_content</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-inherited" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">inherited</span><span
                                class="method-args">(klass)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="inherited-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 727</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">inherited</span>(<span class="ruby-identifier">klass</span>)
  <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">const_set</span>(<span class="ruby-value">:MUST_CALL_VALIDATORS</span>, {})
  <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">const_set</span>(<span class="ruby-value">:MODELS</span>, [])
  <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">const_set</span>(<span class="ruby-value">:GET_ATTRIBUTES</span>, [])
  <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">const_set</span>(<span class="ruby-value">:HAVE_CHILDREN_ELEMENTS</span>, [])
  <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">const_set</span>(<span class="ruby-value">:TO_ELEMENT_METHODS</span>, [])
  <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">const_set</span>(<span class="ruby-value">:NEED_INITIALIZE_VARIABLES</span>, [])
  <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">const_set</span>(<span class="ruby-value">:PLURAL_FORMS</span>, {})

  <span class="ruby-identifier">tag_name</span> = <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp">/::/</span>).<span class="ruby-identifier">last</span>
  <span class="ruby-identifier">tag_name</span>[<span class="ruby-value">0</span>, <span class="ruby-value">1</span>] = <span class="ruby-identifier">tag_name</span>[<span class="ruby-value">0</span>, <span class="ruby-value">1</span>].<span class="ruby-identifier">downcase</span>
  <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-value">:@tag_name</span>, <span class="ruby-identifier">tag_name</span>)
  <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-value">:@have_content</span>, <span class="ruby-keyword">false</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-inherited_base" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">inherited_base</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="inherited_base-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 723</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">inherited_base</span>
  <span class="ruby-operator">::</span><span class="ruby-constant">RSS</span><span class="ruby-operator">::</span><span class="ruby-constant">Element</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-install_get_attribute" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">install_get_attribute</span><span
                                class="method-args">(name, uri, required=true, type=nil, disp_name=nil, element_name=nil)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="install_get_attribute-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 755</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">install_get_attribute</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">required</span>=<span class="ruby-keyword">true</span>,
                          <span class="ruby-identifier">type</span>=<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">disp_name</span>=<span class="ruby-keyword">nil</span>,
                          <span class="ruby-identifier">element_name</span>=<span class="ruby-keyword">nil</span>)
  <span class="ruby-identifier">disp_name</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">name</span>
  <span class="ruby-identifier">element_name</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">name</span>
  <span class="ruby-identifier">writer_type</span>, <span class="ruby-identifier">reader_type</span> = <span class="ruby-identifier">type</span>
  <span class="ruby-identifier">def_corresponded_attr_writer</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">writer_type</span>, <span class="ruby-identifier">disp_name</span>
  <span class="ruby-identifier">def_corresponded_attr_reader</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">reader_type</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-value">:boolean</span> <span class="ruby-keyword">and</span> <span class="ruby-regexp">/\Ais/</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">name</span>
    <span class="ruby-identifier">alias_method</span> <span class="ruby-node">&quot;#{$POSTMATCH}?&quot;</span>, <span class="ruby-identifier">name</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">self</span><span class="ruby-operator">::</span><span class="ruby-constant">GET_ATTRIBUTES</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-identifier">name</span>, <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">required</span>, <span class="ruby-identifier">element_name</span>]
  <span class="ruby-identifier">add_need_initialize_variable</span>(<span class="ruby-identifier">disp_name</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-install_model" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">install_model</span><span
                                class="method-args">(tag, uri, occurs=nil, getter=nil, plural=false)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="install_model-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 746</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">install_model</span>(<span class="ruby-identifier">tag</span>, <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">occurs</span>=<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">getter</span>=<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">plural</span>=<span class="ruby-keyword">false</span>)
  <span class="ruby-identifier">getter</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">tag</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">m</span> = <span class="ruby-keyword">self</span><span class="ruby-operator">::</span><span class="ruby-constant">MODELS</span>.<span class="ruby-identifier">find</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">t</span>, <span class="ruby-identifier">u</span>, <span class="ruby-identifier">o</span>, <span class="ruby-identifier">g</span>, <span class="ruby-identifier">p</span><span class="ruby-operator">|</span> <span class="ruby-identifier">t</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">tag</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">u</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">uri</span>}
    <span class="ruby-identifier">m</span>[<span class="ruby-value">2</span>] = <span class="ruby-identifier">occurs</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-keyword">self</span><span class="ruby-operator">::</span><span class="ruby-constant">MODELS</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-identifier">tag</span>, <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">occurs</span>, <span class="ruby-identifier">getter</span>, <span class="ruby-identifier">plural</span>]
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-install_must_call_validator" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">install_must_call_validator</span><span
                                class="method-args">(prefix, uri)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="install_must_call_validator-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 742</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">install_must_call_validator</span>(<span class="ruby-identifier">prefix</span>, <span class="ruby-identifier">uri</span>)
  <span class="ruby-keyword">self</span><span class="ruby-operator">::</span><span class="ruby-constant">MUST_CALL_VALIDATORS</span>[<span class="ruby-identifier">uri</span>] = <span class="ruby-identifier">prefix</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-install_ns" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">install_ns</span><span
                                class="method-args">(prefix, uri)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="install_ns-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 860</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">install_ns</span>(<span class="ruby-identifier">prefix</span>, <span class="ruby-identifier">uri</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span><span class="ruby-operator">::</span><span class="ruby-constant">NSPOOL</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">prefix</span>)
    <span class="ruby-identifier">raise</span> <span class="ruby-constant">OverlappedPrefixError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">prefix</span>)
  <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">self</span><span class="ruby-operator">::</span><span class="ruby-constant">NSPOOL</span>[<span class="ruby-identifier">prefix</span>] = <span class="ruby-identifier">uri</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-models" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">models</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="models-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 704</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">models</span>
  <span class="ruby-identifier">inherited_array_reader</span>(<span class="ruby-string">&quot;MODELS&quot;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-must_call_validators" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">must_call_validators</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="must_call_validators-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 701</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">must_call_validators</span>
  <span class="ruby-identifier">inherited_hash_reader</span>(<span class="ruby-string">&quot;MUST_CALL_VALIDATORS&quot;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-need_initialize_variables" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">need_initialize_variables</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="need_initialize_variables-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 716</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">need_initialize_variables</span>
  <span class="ruby-identifier">inherited_array_reader</span>(<span class="ruby-string">&quot;NEED_INITIALIZE_VARIABLES&quot;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-need_parent-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">need_parent?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="need_parent-3F-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 856</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">need_parent?</span>
  <span class="ruby-keyword">false</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-new" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">new</span><span
                                class="method-args">(do_validate=true, attrs=nil)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="new-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 874</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">do_validate</span>=<span class="ruby-keyword">true</span>, <span class="ruby-identifier">attrs</span>=<span class="ruby-keyword">nil</span>)
  <span class="ruby-ivar">@parent</span> = <span class="ruby-keyword">nil</span>
  <span class="ruby-ivar">@converter</span> = <span class="ruby-keyword">nil</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">attrs</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">and</span> (<span class="ruby-identifier">do_validate</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>) <span class="ruby-keyword">or</span> <span class="ruby-identifier">do_validate</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>))
    <span class="ruby-identifier">do_validate</span>, <span class="ruby-identifier">attrs</span> = <span class="ruby-keyword">true</span>, <span class="ruby-identifier">do_validate</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-ivar">@do_validate</span> = <span class="ruby-identifier">do_validate</span>
  <span class="ruby-identifier">initialize_variables</span>(<span class="ruby-identifier">attrs</span> <span class="ruby-operator">||</span> {})
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-plural_forms" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">plural_forms</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="plural_forms-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 719</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">plural_forms</span>
  <span class="ruby-identifier">inherited_hash_reader</span>(<span class="ruby-string">&quot;PLURAL_FORMS&quot;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-required_prefix" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">required_prefix</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="required_prefix-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 848</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">required_prefix</span>
  <span class="ruby-keyword">nil</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-required_uri" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">required_uri</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="required_uri-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 852</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">required_uri</span>
  <span class="ruby-string">&quot;&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-tag_name" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">tag_name</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="tag_name-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 867</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">tag_name</span>
  <span class="ruby-ivar">@tag_name</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-to_element_methods" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">to_element_methods</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="to_element_methods-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 713</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_element_methods</span>
  <span class="ruby-identifier">inherited_array_reader</span>(<span class="ruby-string">&quot;TO_ELEMENT_METHODS&quot;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Instance Methods</h3>
                </header>

                  <div id="method-i-convert" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">convert</span><span
                                class="method-args">(value)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="convert-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 903</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">convert</span>(<span class="ruby-identifier">value</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-ivar">@converter</span>
    <span class="ruby-ivar">@converter</span>.<span class="ruby-identifier">convert</span>(<span class="ruby-identifier">value</span>)
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">value</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-converter-3D" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">converter=</span><span
                                class="method-args">(converter)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="converter-3D-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 892</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">converter=</span>(<span class="ruby-identifier">converter</span>)
  <span class="ruby-ivar">@converter</span> = <span class="ruby-identifier">converter</span>
  <span class="ruby-identifier">targets</span> = <span class="ruby-identifier">children</span>.<span class="ruby-identifier">dup</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">have_children_elements</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">variable_name</span>, <span class="ruby-identifier">plural_name</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">targets</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">plural_name</span>))
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">targets</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">target</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">target</span>.<span class="ruby-identifier">converter</span> = <span class="ruby-identifier">converter</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">target</span>.<span class="ruby-identifier">nil?</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-full_name" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">full_name</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="full_name-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 888</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">full_name</span>
  <span class="ruby-identifier">tag_name</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-have_xml_content-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">have_xml_content?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="have_xml_content-3F-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 953</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">have_xml_content?</span>
  <span class="ruby-keyword">false</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-need_base64_encode-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">need_base64_encode?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="need_base64_encode-3F-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 957</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">need_base64_encode?</span>
  <span class="ruby-keyword">false</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-set_next_element" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">set_next_element</span><span
                                class="method-args">(tag_name, next_element)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="set_next_element-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 961</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">set_next_element</span>(<span class="ruby-identifier">tag_name</span>, <span class="ruby-identifier">next_element</span>)
  <span class="ruby-identifier">klass</span> = <span class="ruby-identifier">next_element</span>.<span class="ruby-identifier">class</span>
  <span class="ruby-identifier">prefix</span> = <span class="ruby-string">&quot;&quot;</span>
  <span class="ruby-identifier">prefix</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;#{klass.required_prefix}_&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">required_prefix</span>
  <span class="ruby-identifier">key</span> = <span class="ruby-node">&quot;#{prefix}#{tag_name.gsub(/-/, &#39;_&#39;)}&quot;</span>
  <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">plural_forms</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">key</span>)
    <span class="ruby-identifier">ary</span> = <span class="ruby-identifier">__send__</span>(<span class="ruby-node">&quot;#{self.class.plural_forms[key]}&quot;</span>)
    <span class="ruby-identifier">ary</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">next_element</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">__send__</span>(<span class="ruby-node">&quot;#{key}=&quot;</span>, <span class="ruby-identifier">next_element</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-tag_name" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">tag_name</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="tag_name-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 884</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">tag_name</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">tag_name</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-to_s" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">to_s</span><span
                                class="method-args">(need_convert=true, indent=&#39;&#39;)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="to_s-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 932</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_s</span>(<span class="ruby-identifier">need_convert</span>=<span class="ruby-keyword">true</span>, <span class="ruby-identifier">indent</span>=<span class="ruby-string">&#39;&#39;</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">have_content?</span>
    <span class="ruby-keyword">return</span> <span class="ruby-string">&quot;&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">empty_content?</span> <span class="ruby-keyword">and</span> <span class="ruby-operator">!</span><span class="ruby-identifier">content_is_set?</span>
    <span class="ruby-identifier">rv</span> = <span class="ruby-identifier">tag</span>(<span class="ruby-identifier">indent</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">next_indent</span><span class="ruby-operator">|</span>
      <span class="ruby-keyword">if</span> <span class="ruby-identifier">empty_content?</span>
        <span class="ruby-string">&quot;&quot;</span>
      <span class="ruby-keyword">else</span>
        <span class="ruby-identifier">xmled_content</span>
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">rv</span> = <span class="ruby-identifier">tag</span>(<span class="ruby-identifier">indent</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">next_indent</span><span class="ruby-operator">|</span>
      <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">to_element_methods</span>.<span class="ruby-identifier">collect</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">method_name</span><span class="ruby-operator">|</span>
        <span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">method_name</span>, <span class="ruby-keyword">false</span>, <span class="ruby-identifier">next_indent</span>)
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">rv</span> = <span class="ruby-identifier">convert</span>(<span class="ruby-identifier">rv</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">need_convert</span>
  <span class="ruby-identifier">rv</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-valid-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">valid?</span><span
                                class="method-args">(ignore_unknown_element=true)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="valid-3F-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 911</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">valid?</span>(<span class="ruby-identifier">ignore_unknown_element</span>=<span class="ruby-keyword">true</span>)
  <span class="ruby-identifier">validate</span>(<span class="ruby-identifier">ignore_unknown_element</span>)
  <span class="ruby-keyword">true</span>
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">RSS</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span>
  <span class="ruby-keyword">false</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-validate" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">validate</span><span
                                class="method-args">(ignore_unknown_element=true)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="validate-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 918</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">validate</span>(<span class="ruby-identifier">ignore_unknown_element</span>=<span class="ruby-keyword">true</span>)
  <span class="ruby-identifier">do_validate</span> = <span class="ruby-ivar">@do_validate</span>
  <span class="ruby-ivar">@do_validate</span> = <span class="ruby-keyword">true</span>
  <span class="ruby-identifier">validate_attribute</span>
  <span class="ruby-identifier">__validate</span>(<span class="ruby-identifier">ignore_unknown_element</span>)
<span class="ruby-keyword">ensure</span>
  <span class="ruby-ivar">@do_validate</span> = <span class="ruby-identifier">do_validate</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-validate_for_stream" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">validate_for_stream</span><span
                                class="method-args">(tags, ignore_unknown_element=true)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="validate_for_stream-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 927</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">validate_for_stream</span>(<span class="ruby-identifier">tags</span>, <span class="ruby-identifier">ignore_unknown_element</span>=<span class="ruby-keyword">true</span>)
  <span class="ruby-identifier">validate_attribute</span>
  <span class="ruby-identifier">__validate</span>(<span class="ruby-identifier">ignore_unknown_element</span>, <span class="ruby-identifier">tags</span>, <span class="ruby-keyword">false</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="protected-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Protected Instance Methods</h3>
                </header>

                  <div id="method-i-have_required_elements-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">have_required_elements?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="have_required_elements-3F-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 975</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">have_required_elements?</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span><span class="ruby-operator">::</span><span class="ruby-constant">MODELS</span>.<span class="ruby-identifier">all?</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">tag</span>, <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">occurs</span>, <span class="ruby-identifier">getter</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">occurs</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">or</span> <span class="ruby-identifier">occurs</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;+&quot;</span>
      <span class="ruby-identifier">child</span> = <span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">getter</span>)
      <span class="ruby-keyword">if</span> <span class="ruby-identifier">child</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
        <span class="ruby-identifier">children</span> = <span class="ruby-identifier">child</span>
        <span class="ruby-identifier">children</span>.<span class="ruby-identifier">any?</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">have_required_elements?</span>}
      <span class="ruby-keyword">else</span>
        <span class="ruby-keyword">not</span> <span class="ruby-identifier">child</span>.<span class="ruby-identifier">nil?</span>
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">else</span>
      <span class="ruby-keyword">true</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="private-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Private Instance Methods</h3>
                </header>

                  <div id="method-i-__validate" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">__validate</span><span
                                class="method-args">(ignore_unknown_element, tags=_tags, recursive=true)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="__validate-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 1114</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">__validate</span>(<span class="ruby-identifier">ignore_unknown_element</span>, <span class="ruby-identifier">tags</span>=<span class="ruby-identifier">_tags</span>, <span class="ruby-identifier">recursive</span>=<span class="ruby-keyword">true</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">recursive</span>
    <span class="ruby-identifier">children</span>.<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">child</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">child</span>.<span class="ruby-identifier">validate</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">must_call_validators</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">must_call_validators</span>
  <span class="ruby-identifier">tags</span> = <span class="ruby-identifier">tag_filter</span>(<span class="ruby-identifier">tags</span>.<span class="ruby-identifier">dup</span>)
  <span class="ruby-identifier">p</span> <span class="ruby-identifier">tags</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">DEBUG</span>
  <span class="ruby-identifier">must_call_validators</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">uri</span>, <span class="ruby-identifier">prefix</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">_validate</span>(<span class="ruby-identifier">ignore_unknown_element</span>, <span class="ruby-identifier">tags</span>[<span class="ruby-identifier">uri</span>], <span class="ruby-identifier">uri</span>)
    <span class="ruby-identifier">meth</span> = <span class="ruby-node">&quot;#{prefix}_validate&quot;</span>
    <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">prefix</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">meth</span>, <span class="ruby-keyword">true</span>)
      <span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">meth</span>, <span class="ruby-identifier">ignore_unknown_element</span>, <span class="ruby-identifier">tags</span>[<span class="ruby-identifier">uri</span>], <span class="ruby-identifier">uri</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-_attrs" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">_attrs</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="_attrs-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 1108</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">_attrs</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">get_attributes</span>.<span class="ruby-identifier">collect</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">required</span>, <span class="ruby-identifier">element_name</span><span class="ruby-operator">|</span>
    [<span class="ruby-identifier">element_name</span>, <span class="ruby-identifier">required</span>, <span class="ruby-identifier">name</span>]
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-_tags" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">_tags</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="_tags-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 1094</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">_tags</span>
  <span class="ruby-identifier">rv</span> = []
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">models</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">occurs</span>, <span class="ruby-identifier">getter</span>, <span class="ruby-identifier">plural</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">value</span> = <span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">getter</span>)
    <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">plural</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
      <span class="ruby-identifier">rv</span>.<span class="ruby-identifier">concat</span>([[<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">name</span>]] <span class="ruby-operator">*</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">size</span>)
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">rv</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">name</span>]
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">rv</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-_validate" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">_validate</span><span
                                class="method-args">(ignore_unknown_element, tags, uri, models=self.class.models)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="_validate-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 1142</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">_validate</span>(<span class="ruby-identifier">ignore_unknown_element</span>, <span class="ruby-identifier">tags</span>, <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">models</span>=<span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">models</span>)
  <span class="ruby-identifier">count</span> = <span class="ruby-value">1</span>
  <span class="ruby-identifier">do_redo</span> = <span class="ruby-keyword">false</span>
  <span class="ruby-identifier">not_shift</span> = <span class="ruby-keyword">false</span>
  <span class="ruby-identifier">tag</span> = <span class="ruby-keyword">nil</span>
  <span class="ruby-identifier">models</span> = <span class="ruby-identifier">models</span>.<span class="ruby-identifier">find_all</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">model</span><span class="ruby-operator">|</span> <span class="ruby-identifier">model</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">uri</span>}
  <span class="ruby-identifier">element_names</span> = <span class="ruby-identifier">models</span>.<span class="ruby-identifier">collect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">model</span><span class="ruby-operator">|</span> <span class="ruby-identifier">model</span>[<span class="ruby-value">0</span>]}
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">tags</span>
    <span class="ruby-identifier">tags_size</span> = <span class="ruby-identifier">tags</span>.<span class="ruby-identifier">size</span>
    <span class="ruby-identifier">tags</span> = <span class="ruby-identifier">tags</span>.<span class="ruby-identifier">sort_by</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">element_names</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">x</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">tags_size</span>}
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">models</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">model</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">name</span>, <span class="ruby-identifier">_</span>, <span class="ruby-identifier">occurs</span>, = <span class="ruby-identifier">model</span>

    <span class="ruby-keyword">if</span> <span class="ruby-constant">DEBUG</span>
      <span class="ruby-identifier">p</span> <span class="ruby-string">&quot;before&quot;</span>
      <span class="ruby-identifier">p</span> <span class="ruby-identifier">tags</span>
      <span class="ruby-identifier">p</span> <span class="ruby-identifier">model</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-keyword">if</span> <span class="ruby-identifier">not_shift</span>
      <span class="ruby-identifier">not_shift</span> = <span class="ruby-keyword">false</span>
    <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">tags</span>
      <span class="ruby-identifier">tag</span> = <span class="ruby-identifier">tags</span>.<span class="ruby-identifier">shift</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-keyword">if</span> <span class="ruby-constant">DEBUG</span>
      <span class="ruby-identifier">p</span> <span class="ruby-string">&quot;mid&quot;</span>
      <span class="ruby-identifier">p</span> <span class="ruby-identifier">count</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-keyword">case</span> <span class="ruby-identifier">occurs</span>
    <span class="ruby-keyword">when</span> <span class="ruby-string">&#39;?&#39;</span>
      <span class="ruby-keyword">if</span> <span class="ruby-identifier">count</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">2</span>
        <span class="ruby-identifier">raise</span> <span class="ruby-constant">TooMuchTagError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">tag_name</span>)
      <span class="ruby-keyword">else</span>
        <span class="ruby-keyword">if</span> <span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">tag</span>
          <span class="ruby-identifier">do_redo</span> = <span class="ruby-keyword">true</span>
        <span class="ruby-keyword">else</span>
          <span class="ruby-identifier">not_shift</span> = <span class="ruby-keyword">true</span>
        <span class="ruby-keyword">end</span>
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">when</span> <span class="ruby-string">&#39;*&#39;</span>
      <span class="ruby-keyword">if</span> <span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">tag</span>
        <span class="ruby-identifier">do_redo</span> = <span class="ruby-keyword">true</span>
      <span class="ruby-keyword">else</span>
        <span class="ruby-identifier">not_shift</span> = <span class="ruby-keyword">true</span>
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">when</span> <span class="ruby-string">&#39;+&#39;</span>
      <span class="ruby-keyword">if</span> <span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">tag</span>
        <span class="ruby-identifier">do_redo</span> = <span class="ruby-keyword">true</span>
      <span class="ruby-keyword">else</span>
        <span class="ruby-keyword">if</span> <span class="ruby-identifier">count</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
          <span class="ruby-identifier">not_shift</span> = <span class="ruby-keyword">true</span>
        <span class="ruby-keyword">else</span>
          <span class="ruby-identifier">raise</span> <span class="ruby-constant">MissingTagError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">tag_name</span>)
        <span class="ruby-keyword">end</span>
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">else</span>
      <span class="ruby-keyword">if</span> <span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">tag</span>
        <span class="ruby-keyword">if</span> <span class="ruby-identifier">models</span>[<span class="ruby-identifier">i</span><span class="ruby-value">+1</span>] <span class="ruby-keyword">and</span> <span class="ruby-identifier">models</span>[<span class="ruby-identifier">i</span><span class="ruby-value">+1</span>][<span class="ruby-value">0</span>] <span class="ruby-operator">!=</span> <span class="ruby-identifier">name</span> <span class="ruby-keyword">and</span>
            <span class="ruby-identifier">tags</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">tags</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">name</span>
          <span class="ruby-identifier">raise</span> <span class="ruby-constant">TooMuchTagError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">tag_name</span>)
        <span class="ruby-keyword">end</span>
      <span class="ruby-keyword">else</span>
        <span class="ruby-identifier">raise</span> <span class="ruby-constant">MissingTagError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">tag_name</span>)
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-keyword">if</span> <span class="ruby-constant">DEBUG</span>
      <span class="ruby-identifier">p</span> <span class="ruby-string">&quot;after&quot;</span>
      <span class="ruby-identifier">p</span> <span class="ruby-identifier">not_shift</span>
      <span class="ruby-identifier">p</span> <span class="ruby-identifier">do_redo</span>
      <span class="ruby-identifier">p</span> <span class="ruby-identifier">tag</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-keyword">if</span> <span class="ruby-identifier">do_redo</span>
      <span class="ruby-identifier">do_redo</span> = <span class="ruby-keyword">false</span>
      <span class="ruby-identifier">count</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
      <span class="ruby-keyword">redo</span>
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">count</span> = <span class="ruby-value">1</span>
    <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">ignore_unknown_element</span> <span class="ruby-keyword">and</span> <span class="ruby-operator">!</span><span class="ruby-identifier">tags</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">and</span> <span class="ruby-operator">!</span><span class="ruby-identifier">tags</span>.<span class="ruby-identifier">empty?</span>
    <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotExpectedTagError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">tags</span>.<span class="ruby-identifier">first</span>, <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">tag_name</span>)
  <span class="ruby-keyword">end</span>

<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-calc_indent" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">calc_indent</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>For backward compatibility</p>

                              <div class="method-source-code" id="calc_indent-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 1077</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">calc_indent</span>
  <span class="ruby-string">&#39;&#39;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-children" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">children</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="children-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 1081</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">children</span>
  <span class="ruby-identifier">rv</span> = []
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">models</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">occurs</span>, <span class="ruby-identifier">getter</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">value</span> = <span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">getter</span>)
    <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span>
    <span class="ruby-identifier">value</span> = [<span class="ruby-identifier">value</span>] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
    <span class="ruby-identifier">value</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">rv</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">v</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Element</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">rv</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-collect_attrs" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">collect_attrs</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="collect_attrs-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 1060</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">collect_attrs</span>
  <span class="ruby-identifier">attrs</span> = {}
  <span class="ruby-identifier">_attrs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">required</span>, <span class="ruby-identifier">alias_name</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">value</span> = <span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">alias_name</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">name</span>)
    <span class="ruby-keyword">return</span> <span class="ruby-keyword">nil</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">required</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span>
    <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span>
    <span class="ruby-keyword">return</span> <span class="ruby-keyword">nil</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">attrs</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">name</span>)
    <span class="ruby-identifier">attrs</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">value</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">attrs</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-content_is_set-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">content_is_set?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="content_is_set-3F-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 1248</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">content_is_set?</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">have_xml_content?</span>
    <span class="ruby-identifier">__send__</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">xml_getter</span>)
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">content</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-empty_content-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">empty_content?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="empty_content-3F-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 1244</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">empty_content?</span>
  <span class="ruby-keyword">false</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-initialize_have_children_elements" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">initialize_have_children_elements</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="initialize_have_children_elements-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 1009</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize_have_children_elements</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">have_children_elements</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">variable_name</span>, <span class="ruby-identifier">plural_name</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">&quot;@#{variable_name}&quot;</span>, [])
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-initialize_variables" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">initialize_variables</span><span
                                class="method-args">(attrs)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="initialize_variables-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 992</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize_variables</span>(<span class="ruby-identifier">attrs</span>)
  <span class="ruby-identifier">normalized_attrs</span> = {}
  <span class="ruby-identifier">attrs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">normalized_attrs</span>[<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>] = <span class="ruby-identifier">value</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">need_initialize_variables</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">variable_name</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">value</span> = <span class="ruby-identifier">normalized_attrs</span>[<span class="ruby-identifier">variable_name</span>.<span class="ruby-identifier">to_s</span>]
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">value</span>
      <span class="ruby-identifier">__send__</span>(<span class="ruby-node">&quot;#{variable_name}=&quot;</span>, <span class="ruby-identifier">value</span>)
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">&quot;@#{variable_name}&quot;</span>, <span class="ruby-keyword">nil</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">initialize_have_children_elements</span>
  <span class="ruby-ivar">@content</span> = <span class="ruby-identifier">normalized_attrs</span>[<span class="ruby-string">&quot;content&quot;</span>] <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">have_content?</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-make_start_tag" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">make_start_tag</span><span
                                class="method-args">(indent, next_indent, attrs)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="make_start_tag-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 1050</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">make_start_tag</span>(<span class="ruby-identifier">indent</span>, <span class="ruby-identifier">next_indent</span>, <span class="ruby-identifier">attrs</span>)
  <span class="ruby-identifier">start_tag</span> = [<span class="ruby-node">&quot;#{indent}&lt;#{full_name}&quot;</span>]
  <span class="ruby-keyword">unless</span> <span class="ruby-identifier">attrs</span>.<span class="ruby-identifier">empty?</span>
    <span class="ruby-identifier">start_tag</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">attrs</span>.<span class="ruby-identifier">collect</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
      <span class="ruby-node">%Q[#{CGI.escapeHTML(key.to_s)}=&quot;#{CGI.escapeHTML(value.to_s)}&quot;]</span>
    <span class="ruby-keyword">end</span>.<span class="ruby-identifier">join</span>(<span class="ruby-node">&quot;\n#{next_indent}&quot;</span>)
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">start_tag</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&quot; &quot;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-tag" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">tag</span><span
                                class="method-args">(indent, additional_attrs={}, &amp;block)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="tag-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 1015</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">tag</span>(<span class="ruby-identifier">indent</span>, <span class="ruby-identifier">additional_attrs</span>={}, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
  <span class="ruby-identifier">next_indent</span> = <span class="ruby-identifier">indent</span> <span class="ruby-operator">+</span> <span class="ruby-constant">INDENT</span>

  <span class="ruby-identifier">attrs</span> = <span class="ruby-identifier">collect_attrs</span>
  <span class="ruby-keyword">return</span> <span class="ruby-string">&quot;&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">attrs</span>.<span class="ruby-identifier">nil?</span>

  <span class="ruby-keyword">return</span> <span class="ruby-string">&quot;&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">have_required_elements?</span>

  <span class="ruby-identifier">attrs</span>.<span class="ruby-identifier">update</span>(<span class="ruby-identifier">additional_attrs</span>)
  <span class="ruby-identifier">start_tag</span> = <span class="ruby-identifier">make_start_tag</span>(<span class="ruby-identifier">indent</span>, <span class="ruby-identifier">next_indent</span>, <span class="ruby-identifier">attrs</span>.<span class="ruby-identifier">dup</span>)

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">block</span>
    <span class="ruby-identifier">content</span> = <span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">next_indent</span>)
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">content</span> = []
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">content</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
    <span class="ruby-identifier">content</span> = [<span class="ruby-identifier">content</span>]
    <span class="ruby-identifier">start_tag</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;&gt;&quot;</span>
    <span class="ruby-identifier">end_tag</span> = <span class="ruby-node">&quot;&lt;/#{full_name}&gt;&quot;</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">content</span> = <span class="ruby-identifier">content</span>.<span class="ruby-identifier">reject</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">empty?</span>}
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">content</span>.<span class="ruby-identifier">empty?</span>
      <span class="ruby-keyword">return</span> <span class="ruby-string">&quot;&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">attrs</span>.<span class="ruby-identifier">empty?</span>
      <span class="ruby-identifier">end_tag</span> = <span class="ruby-string">&quot;/&gt;&quot;</span>
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">start_tag</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;&gt;\n&quot;</span>
      <span class="ruby-identifier">end_tag</span> = <span class="ruby-node">&quot;\n#{indent}&lt;/#{full_name}&gt;&quot;</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">start_tag</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">content</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&quot;\n&quot;</span>) <span class="ruby-operator">+</span> <span class="ruby-identifier">end_tag</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-tag_filter" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">tag_filter</span><span
                                class="method-args">(tags)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="tag_filter-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 1235</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">tag_filter</span>(<span class="ruby-identifier">tags</span>)
  <span class="ruby-identifier">rv</span> = {}
  <span class="ruby-identifier">tags</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">tag</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">rv</span>[<span class="ruby-identifier">tag</span>[<span class="ruby-value">0</span>]] = [] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">rv</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">tag</span>[<span class="ruby-value">0</span>])
    <span class="ruby-identifier">rv</span>[<span class="ruby-identifier">tag</span>[<span class="ruby-value">0</span>]].<span class="ruby-identifier">push</span>(<span class="ruby-identifier">tag</span>[<span class="ruby-value">1</span>])
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">rv</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-tag_name_with_prefix" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">tag_name_with_prefix</span><span
                                class="method-args">(prefix)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="tag_name_with_prefix-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 1072</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">tag_name_with_prefix</span>(<span class="ruby-identifier">prefix</span>)
  <span class="ruby-node">&quot;#{prefix}:#{tag_name}&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-validate_attribute" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">validate_attribute</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="validate_attribute-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 1132</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">validate_attribute</span>
  <span class="ruby-identifier">_attrs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">a_name</span>, <span class="ruby-identifier">required</span>, <span class="ruby-identifier">alias_name</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">value</span> = <span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-node">&quot;@#{alias_name || a_name}&quot;</span>)
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">required</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">nil?</span>
      <span class="ruby-identifier">raise</span> <span class="ruby-constant">MissingAttributeError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">tag_name</span>, <span class="ruby-identifier">a_name</span>)
    <span class="ruby-keyword">end</span>
    <span class="ruby-identifier">__send__</span>(<span class="ruby-node">&quot;#{alias_name || a_name}=&quot;</span>, <span class="ruby-identifier">value</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-xmled_content" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">xmled_content</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="xmled_content-source">
            <pre><span class="ruby-comment"># File rss-0.3.0/lib/rss/rss.rb, line 1256</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">xmled_content</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">have_xml_content?</span>
    <span class="ruby-identifier">__send__</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">xml_getter</span>).<span class="ruby-identifier">to_s</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">_content</span> = <span class="ruby-identifier">content</span>
    <span class="ruby-identifier">_content</span> = [<span class="ruby-identifier">_content</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-string">&quot;m0&quot;</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">need_base64_encode?</span>
    <span class="ruby-constant">CGI</span>.<span class="ruby-identifier">escapeHTML</span>(<span class="ruby-identifier">_content</span>.<span class="ruby-identifier">to_s</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

              </section>
              </main>



            </div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is provided by <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>.</p><p><a href="https://jamesbritt.bandcamp.com/">Maximum R+D</a>.  </p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

